package com.yylending.las.repay.repayrecord;

import com.yyfax.infrastructure.eventbus.EventAgent;
import com.yyfax.infrastructure.mvp.IView;
import com.yyfax.infrastructure.mvp.Presenter;
import com.yyfax.infrastructure.mvp.PresenterFactory;
import com.yyfax.infrastructure.network.entity.BaseResultEntity;
import com.yylending.las.personal.loan.LoanListPresenter;

import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

/**
 * Created by ying_he on 2017/6/8.<br>
 * Copyright  2017 www.yylending.com. All Rights Reserved.<br><br>
 */
public class RepayPlanOrHistoryPresenter extends Presenter<RepayPlanOrHistoryModel, RepayPlanOrHistoryPresenter.View> {
	private static final String TAG = LoanListPresenter.class.getSimpleName();

	private RepayPlanOrHistoryPresenter.View mView;

	public static class Generator implements PresenterFactory<RepayPlanOrHistoryPresenter> {
		@Override
		public RepayPlanOrHistoryPresenter create() {
			return new RepayPlanOrHistoryPresenter();
		}
	}

	@Override
	public void attach(RepayPlanOrHistoryPresenter.View view) {
		mView = view;
		mModel = new RepayPlanOrHistoryModel();
		EventAgent.register(this);
	}

	@Override
	public void detach() {
		mView = null;
		mModel = null;
		EventAgent.unregister(this);
	}

	public interface View extends IView {
	}

	void obtainRepayStatus() {
	}

	@Subscribe(threadMode = ThreadMode.MAIN)
	public void obtainRepayStatusResult(RepayPlanOrHistoryModel.RepayStatusResult result) {
		if (BaseResultEntity.isResponseSuccess(result)) {
		} else {
		}
	}
}
